﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChooseToDept.aspx.cs" Inherits="SGDemo.Web.ChooseToDept" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>组织选择 - 辉煌装修信息管理系统</title>
    <link href="Styles/themes/css/chooseToOrganization.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="Scripts/Plugins/jquery.extensions.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#progressBarBg,#progressBar').hide();
        });
        //选择部门
        var doSelectDept = function (deptKeyid, deptCode, deptName) {
            var str = $.formatString('DeptKeyid={0}&DeptCode={1}&DeptName={2}&DeptType={3}', arguments[0], arguments[1], arguments[2], arguments[3]);
            cabExecute.PerformCallback(str);
        }
        //开始执行回调函数,弹出进度条
        var doBeginCallback = function () {
            $('#progressBarBg,#progressBar').show();
        }
        //回调完成
        var doCallbackComplete = function (s, e) {
            if (e.result == 'Success') {
                location.href = "Main.aspx";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <dx:ASPxCallback ID="cabExecute" runat="server" ClientInstanceName="cabExecute" OnCallback="cabExecute_Callback">
        <ClientSideEvents CallbackComplete="doCallbackComplete" BeginCallback="doBeginCallback" />
    </dx:ASPxCallback>

    <div class="wrapper">
        <div class="content">
            <div class="header">
                <h1>选择公司或者部门</h1>
            </div>
            <div>
                <table id="orgList" cellpadding="0" cellspacing="0" border="0">
                    <asp:Repeater ID="rptDeptList" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td class="leftCol">
                                </td>
                                <td class="middleCol">
                                    <%# Eval("DeptName") %>
                                </td>
                                <td class="rightCol">
                                    <%# Eval("DeptCode") %>
                                </td>
                                <td class="rightCol">
                                    <input type="image" src="Styles/themes/default/images/chooseToOrganization/selectButton.png"
                                        onclick="doSelectDept('<%# Eval("Keyid") %>','<%# Eval("DeptCode") %>','<%# Eval("DeptName") %>','<%# Eval("DeptType")%>');return false;" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
            <div class="footer">
            </div>
        </div>
    </div>
    <div id="progressBarBg" class='background'>
    </div>
    <div id="progressBar" class='progressBar'>
        数据加载中，请稍等...
    </div>
    </form>
</body>
</html>
